package com.axend.aerosense.room.ui.activity;


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;

import com.axend.aerosense.base.activity.MvvmBaseActivity;
import com.axend.aerosense.base.viewmodel.BaseViewModel;
import com.axend.aerosense.common.bean.FunctionRoomEnum;
import com.axend.aerosense.room.R;
import com.axend.aerosense.room.databinding.RoomActivityVipFunAboutBinding;
import com.axend.aerosense.room.entity.VipFunAboutBean;

/**
 * vip功能介绍界面
 */
public class RoomVipFunAboutActivity extends MvvmBaseActivity<RoomActivityVipFunAboutBinding, BaseViewModel> {

    public static final String FLAG_CONTENT = "FLAG_CONTENT";

    @Override
    protected BaseViewModel getViewModel() {
        return null;
    }

    @Override
    protected int getBindingVariable() {
        return 0;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.room_activity_vip_fun_about;
    }

    @Override
    protected void onRetryBtnClick() {

    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Intent intent = getIntent();
        if (null != intent){
            FunctionRoomEnum functionRoomEnum =
                    (FunctionRoomEnum) intent.getSerializableExtra(RoomVipFunAboutActivity.FLAG_CONTENT);
            if (null != functionRoomEnum){
                viewDataBinding.roomAboutTitle.setText(functionRoomEnum.getName());
                viewDataBinding.roomAboutContent.setText(functionRoomEnum.getAboutTipsRes());
            }
        }

        //返回按钮
        viewDataBinding.devBtnBack.setOnClickListener(v -> {
            finish();
        });
    }
}
